<?php
$error = "";
if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))
{
	// get bytearray
	$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
	$fp = fopen("images/".$_GET['id'].".jpg","wb");
	fwrite($fp,$jpg);
	fclose($fp);
}
?>